home *** CD-ROM | disk | FTP | other *** search
- BSD Bourne Shell for MiNT
- ported by Michael Hohmuth <hohmuth@freia.inf.tu-dresden.de>
-
- Distribution PL 03
- 21 May 1993
-
- The description of the MiNT port follows after the original copyright notice:
-
- -------------------------------------------------------------------------------
-
- Copyright (c) 1991 The Regents of the University of California.
- All rights reserved.
-
- This code is derived from software contributed to Berkeley by
- Kenneth Almquist.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. All advertising materials mentioning features or use of this software
- must display the following acknowledgement:
- This product includes software developed by the University of
- California, Berkeley and its contributors.
- 4. Neither the name of the University nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
- -------------------------------------------------------------------------------
-
- This is my (Michael Hohmuth's) port of Kenneth Almquist's BSD Bourne Shell sh
- (from the 2nd BSD Networking Distribution) (also known as "ash") to MiNT
- (_not_ TOS).
-
- This file only describes the special features of the MiNT version. For
- documentation refer to the manual pages.
-
- Manifest:
-
- ARGV.TXT - a proposal for an ARGV standard extension that
- adds support for empty parameters
- README.ST - this file
- funcs/* - a set of useful functions for sh
- sh - sh binary for MiNT (rename it to sh.ttp if you want)
- sh.1 - sh manual
- sh.man - sh manual in roff format
-
- The source distribution additionally contains:
-
- TOUR - description of sh source
- sh03diffs - source diffs relative to 2nd BSD Networking Distr.
- all other files - sh source
-
- Special features of the MiNT version:
-
- o The version of `sh' in this distribution is MiNT-friendly in the
- following aspects:
-
- (1) sh uses the DOS filesystem compatible file name
- "profile.sh" instead of ".profile".
-
- (2) sh strips CR's ('\r') from its input.
-
- o This version of `sh' has been configured to support a virtual
- directory "/u" which contains the home directories of all
- users as subdirectories ("/u/heinz" is equivalent to user heinz's
- home directory).
-
- o The MiNT version of `sh' supports the following suffixes which
- executable files can have: ".tpp", ".tos", ".prg".
-
- o The MiNT version of `sh' will behave like a login shell if it
- has been started from the desktop (i.e. without ARGV) and with
- no arguments.
-
- o `sh' has been linked with the MiNT Library PatchLevel
- pre-31. That means that it has the following additional
- feature:
-
- All environment variables which are listed in the environment
- variable "PCONVERT" will be converted from a DOS style path
- list to a Unix style one. If "PCONVERT" does not exist, it
- defaults to "PATH". Please note that setting PCONVERT from
- inside sh has no effect on the other environment variables
- (except when spawning, when the variables will be converted
- back to TOS style). So make sure that PCONVERT has been
- initialized before you enter sh (e.g. set in in your mint.cnf
- file).
-
- I suggest you use at least the following setup for "PCONVERT":
- "PATH,HOME,SHELL,CDPATH".
-
- o Support for empty (i.e., zero length) command line parameters
- has been included, according to a proposed extension to Atari's
- ARGV standard (see ARGV.TXT for details). That means that
- `sh' can accept and pass empty parameters given that the
- calling/called program also supports the ARGV standard
- extension. (Hopyfully, one of the next mntlib PatchLevels will
- contain support for this.)
-
- o `sh' has been compiled with GCC 2.3.3 pl 2 and the
- "-mbaserel" option so that it is sharable under MiNT.
-
- What I have _not_ done:
-
- I haven't made attempts to let `sh' understand TOS style file names
- (such as "a:\bla\foo") as I generally don't use it interactively
- but mostly as a script interpreter.
-
- `sh' doesn't import a list of suffixes from the SUFFIXES environment
- variable yet, the list of executable suffixes it knows of is hard-
- coded.
-
- I haven't touched the scripts in the funcs/ subdirectory. Depending
- on your setup, they'll probably require some changes -- see below.
-
- Random notes:
-
- You need good versions of `pwd' and `test' (which are not built
- into `sh') for maximal utility. I have included a simple `pwd'
- programs in this distribution; a version of `test' comes with
- the GNU shell utilities (I have not included Stephan's version
- of `test' (from his original distribution) in this distribution
- as it seems to have a limited functionality).
-
- Don't forget to create a symbolic link `[' -> `test' (or, on TOS
- file systems, copy `test.ttp' to `[.ttp'). Many shell scripts
- rely on this.
-
- Keep in mind that most MiNT utilities don't yet support empty
- parameters (the ARGV standard extension providing support for this
- is still very new, and not yet well-established). That's
- why things like
- if [ "$bla" = "" ]
- won't work as you would expect them to if `/bin/[' (resp.
- `/bin/test') doesn't support the ARGV standard extension.
- Use something like
- if [ "$bla " = " " ]
- instead.
- Some of the scripts in the funcs/ subdir also rely on empty
- parameters and will require some changes if your setup doesn't
- support the new ARGV scheme.
-
- Credits:
-
- Ash has been written by Kenneth Almquist. Several bug fixes and
- enhancements by Jim Wilson <wilson@moria.cygnus.com> and
- J.T. Conklin <conklin@talisman.kaleida.com> have been applied;
- these have been part of the 386BSD port of ash.
-
- The original port of ash to MiNT was done by Stephan Neuhaus
- <neuhaus@informatik.uni-kl.de>. Stephen R. Usher
- <susher@earth.ox.ac.uk> made some fixes.
-
- I actually made it work correctly by applying the nessecary changes
- to the MiNT library, and improved compatibelity with MiNT.
-
- Enjoy!
-
- Michael Hohmuth
-
- hohmuth@freia.inf.tu-dresden.de
- mh1@irz.inf.tu-dresden.de
-
-
- --------------------------------------------------------------------------
-
- APPENDIX
-
- If you want to re-compile sh for MiNT:
-
- Get the source distribution of my port, if you do not already
- have it.
-
- The source distribution also contains diffs relative to the 2nd
- BSD Networking distribution. These can be useful if you plan to
- hack a newer version of `sh'.
-
- You should have a non-TOS file system to build `sh'. Also,
- you need a `sh' binary for the source generator scripts,
- and good versions of fileutilities, `grep', `awk', `sed' (well,
- the source distribution does contain the files that are generated
- with the help of these programs, so you probably do not actually
- need them) and GNU Make.
-
- Edit the "Makefile" to suit your taste. Delete the definition
- of the symbol "DOSFS" if you prefer to read ".profile" instead
- of "profile.sh".
-